﻿@using Webdiyer.WebControls.Mvc;
@using MinistryStandardPlatformWeb;
@model PagedList<MinistryStandardPlatformEntity.InfoVehicle>
<style>
    a
    {
        color: #428bca;
        text-decoration: none;
        cursor: pointer;
    }

    a:hover, a:focus
    {
        color: #2a6496;
        text-decoration: underline;
    }

    select
    {
        height: auto;
    }
</style>
<table class="tablelist">
    <thead>
        <tr>
            <th>序号</th>
            <th>车辆内部编号</th>
            <th>车牌号</th>
            <th>车辆类别</th>
            <th>信息（SIM）卡号</th>
            <th>车辆车架号</th>
            <th>发动机号</th>
            <th>终端类型</th>
            <th>终端版本号</th>
            <th>车辆状态</th>
            <th>安装日期</th>
            <th>所属单位</th>
            <th>油箱已初始化</th>
            <th>备注</th>
        </tr>
    </thead>
    <tbody>
        @{
            int i = (Model.CurrentPageIndex - 1) * Model.PageSize;

            foreach (var item in Model)
            {
                ++i;
            <tr id="@item.Vehiclenum">
                <td>@i</td>
                <td>@item.FInnerId</td>
                <td>@item.VehicleId</td>
                <td>@item.VehicleType</td>
                <td>@item.SIM</td>
                <td>@item.VIN</td>
                <td>@item.EngineId</td>
                <td>@item.GPSTypeName</td>
                <td>@item.GPSVersionName</td>
                <td>@item.VehiclecurState</td>
                <td>@{@item.InstallDate}</td>
                <td>
                    @{
                if (item.InfoUnit != null)
                {
                        @item.InfoUnit.UNITNAME;
                }
                    }
                </td>
                <td>@{
                        if (@item.IsOilBoxInited)
                        { 
                            @:是 
                        }
                        else
                        {
                            @:否
                        }
                }
                </td>
                <td>@item.FMemo</td>
            </tr>
            }
        }
    </tbody>
</table>
<div style="margin-top: 5px;">
    <div style="float: left; width: 50%; margin-left: 10px;">共 @Model.TotalPageCount 页 @Model.TotalItemCount 条记录，当前为第 @Model.CurrentPageIndex 页</div>
    @*@Ajax.Pager(Model, new PagerOptions { PageIndexParameterName = "pageIndex", ShowPageIndexBox = true, PageIndexBoxType = PageIndexBoxType.DropDownList, ShowGoButton = false }, new MvcAjaxOptions { UpdateTargetId = "tablelist", HttpMethod = "Post", DataFormId = "searchForm"}, new { style = "float:right;margin-right:10px;" })*@
    @Html.MyPager(@Model, "pagerDiv", "float:right;margin-right:10px;")
</div>
